module syn_cnt10(
input clk,
input rst,
output reg[4:0]q
);

always@(posedge clk)
begin
	if (rst)
		q = 0;
	else
		q = q + 1;
		q = q % 10;
end

endmodule
